package com.itheima.springtask.demo;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
@Component
public class CountAttendTask {

    @Scheduled(cron = "0,1,2,4 * * * * *")
    public void run(){
        System.out.println("任务执行了:" + new Date());
    }
}
